package com.octopus.registry;

import java.lang.reflect.Method;

import com.octopus.string.StringUtils;

public class ServiceUnit implements java.io.Serializable{
	
	private static final long serialVersionUID = 1L;
	private Class<?> klass;
	private Object object;
	private boolean isStatic;
	private Method method;
	public ServiceUnit(Class<?> klass, Object object, boolean isStatic, Method method){
		this.klass = klass;
		this.object = object;
		this.isStatic = isStatic;
		this.method = method;
	}
	public Class<?> getKlass() {
		return klass;
	}
	public Object getObject() {
		return object;
	}
	public boolean isStatic() {
		return isStatic;
	}
	public Method getMethod() {
		return method;
	}
	public String toString(){
		return StringUtils.concat("class["+(klass != null ? klass.getName() : "NULL")+"]object[",String.valueOf(object),"]isStatic["+String.valueOf(isStatic)+"]method["+(method != null ? method.getName() : "NULL")+"]");
	}
}
